package cn.com.homeyoda.aimate.aihealth.ui.videoinspect;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.annotation.RequiresApi;
import androidx.databinding.library.baseAdapters.BR;
import androidx.lifecycle.ViewModelProviders;

import cn.com.homeyoda.aimate.aihealth.R;
import cn.com.homeyoda.aimate.aihealth.app.AppViewModelFactory;
import cn.com.homeyoda.aimate.aihealth.base.BaseActivity;
import cn.com.homeyoda.aimate.aihealth.databinding.ActivityTijianResultBinding;
import cn.com.homeyoda.aimate.aihealth.databinding.ActivityTijianResultOneBinding;

import static com.wzq.mvvmsmart.utils.Utils.getContext;

//首次体检
public class TiJianResultOneActivity extends BaseActivity<ActivityTijianResultOneBinding, VideoInspectModel>{

    String reportId;//检测报告id
    String faceId;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public VideoInspectModel initViewModel() {
        AppViewModelFactory factory = AppViewModelFactory.getInstance(getApplication());
        return ViewModelProviders.of(this, factory).get(VideoInspectModel.class);
    }

    @Override
    public void initData() {
        super.initData();
        reportId = getIntent().getStringExtra("reportId");
        faceId = getIntent().getStringExtra("faceId");
        initView();
    }

    private void initView() {


        binding.tiao.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getContext(), DetectionResultActivity.class);
                intent.putExtra("reportId", reportId);
                startActivity(intent);
                finish();
            }
        });

        binding.wanshan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getContext(), ImproveInfoActivity.class);
                intent.putExtra("reportId", reportId);
                intent.putExtra("faceId", faceId);
                startActivity(intent);
                finish();
            }
        });



    }







    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    @Override
    protected void onDestroy() {
        super.onDestroy();

    }



    @Override
    public void initViewObservable() {
        super.initViewObservable();

    }

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_tijian_result_one;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }
}
